﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Import_cpdb_News : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            bd();
        }
    }

    private void bd()
    {
        CMSModel.CMSEntities dal = DAL.DBManager.GetCmsEmtity();
        var data=dal.CPTypeMatching.Select(x=>new {x.LocalTypeId,x.CpTypeId,x.CpTypeName,x.CTime,x.UTime,LocalTypeName= dal.NewsType.Where(c=>c.id==x.LocalTypeId).FirstOrDefault().name});
        Repeater1.DataSource = data;
        Repeater1.DataBind();
    }
}